From: Stijn Tintel Date: Sat, 6 Nov 2021 01:21:33 +0000 (+0200) Subject: treewide: support set timeout X-Git-Url: http://git.openwrt.org/%22http:/oss.oetiker.ch/rrdtool//%22/%22http:/oss.oetiker.ch/rrdtool/%22?a=commitdiff_plain;h=38889b77cc6f59eefd640b19f33e55efb53965aa;p=project%2Ffirewall4.git treewide: support set timeout Signed-off-by: Stijn Tintel Reviewed-by: Jo-Philipp Wich --- diff --git a/root/usr/share/firewall4/templates/ruleset.uc b/root/usr/share/firewall4/templates/ruleset.uc index e392ada..6b87a49 100644 --- a/root/usr/share/firewall4/templates/ruleset.uc +++ b/root/usr/share/firewall4/templates/ruleset.uc @@ -27,6 +27,9 @@ table inet fw4 { {% if (set.maxelem > 0): %} size {{ set.maxelem }} {% endif %} +{% if (set.timeout >= 0): %} + timeout {{ set.timeout }}s +{% endif %} {% if (set.interval): %} flags interval {% endif %} diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index 7d20871..4769827 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -2728,7 +2728,7 @@ return { netmask: [ "int", null, UNSUPPORTED ], maxelem: [ "int" ], hashsize: [ "int", null, UNSUPPORTED ], - timeout: [ "int", null, UNSUPPORTED ], + timeout: [ "int", "-1" ], external: [ "string", null, UNSUPPORTED ],